Lancaster is a city in far northern Los Angeles County in Southern California, eight miles from the Kern County line.